if( isset( $wpSave ) or isset( $wpPreview ) ) {
$this->editForm( "preview" );
} else {
- $wgOut->readOnlyPage();
+ $wgOut->readOnlyPage( $this->mArticle->getContent() );
}
return;
}
exit();
}
- function readOnlyPage()
+ function readOnlyPage( $source = "" )
{
global $wgUser, $wgReadOnlyFile;
$reason = implode( "", file( $wgReadOnlyFile ) );
$text = str_replace( "$1", $reason, wfMsg( "readonlytext" ) );
+
+ if($source) {
+ $rows = $wgUser->getOption( "rows" );
+ $cols = $wgUser->getOption( "cols" );
+ $text .= "</p>\n<textarea cols='$cols' rows='$rows' readonly>" .
+ htmlspecialchars( $source ) . "\n</textarea>";
+ }
+
$this->addHTML( $text );
$this->returnToMain( false );
}